{#
Copyright (c) 2020 Andy Zhou
MIT License
#}
{% extends 'base.html' %}
{% from 'macros.html' import post_actions with context %}
{% block title %}{{ _('Your collections') }}{% endblock %}
{% block page_content %}
    <ul class="list-group">
        {% if posts | length > 0%}
            {% for post in posts %}
            <li class="list-group-item">
            <h3 class="text-primary">{{ post.title }}</h3>
                <div>
                    {{ post.content | striptags | truncate(200) }}
                    <small class="text-primary">
                        <a href="{{ url_for('main.full_post', slug=post.slug) }}">{{ _('Read More') }}</a>
                    </small>
                </div>
                {{ post_actions(post) }}
            </li>
            {% endfor %}
        {% else %}
            {{ _("You don't have any collections") }}
        {% endif %}
    </ul>
{% endblock page_content %}
